package com.zc58s.config;

import com.zc58s.condition.TulingAspect;
import com.zc58s.condition.TulingConditional;
import com.zc58s.condition.TulingLog;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

/**
 * @author : fujc-dev@qq.com
 * @created : 2022/10/14 15:23
 */
@Configuration
public class ConditionConfig {

    @Bean
    public TulingAspect tulingAspect() {
        return new TulingAspect();
    }

    /**
     * 在往容器中导入Bean的时候，要进行条件判断。
     */
    @Conditional(value = TulingConditional.class)
    @Bean
    public TulingLog tulingLog() {
        return new TulingLog();
    }
}
